Rendering best practices
Optimizing rendering performance is often done at the cost of rendering quality or memory consumption, but the improvements in the performance of your application can be significant.
Optimizing rendering performance of your applications
To optimize rendering performance of your applications, consider the following:
- Partial rendering can be an effective way for optimizing performance of applications where only part of the scene is in motion. See Partial rendering.
- Recalculation of layout caused by changes in the scene can hinder performance. See Optimizing rendering of layouts.
- Placing the layers in the scene graph in front-to-back order. See Setting layers for efficient rendering.
- Excessive overdraw can decrease performance on the GPU in the form of increased fill-rate. See Preventing overdraw with sorting filters.
- When your application contains objects that do not have to be rendered for every frame, create a composer that renders such objects only once. See Rendering static content.
- Transparent objects must be rendered from back to front, because visualization of transparent objects relies on having proper data behind them, in order to solve the blending equations properly. See Rendering transparent objects.
- If objects are presented in an order that requires excessive switching between shader programs, the rendering can slow down. See Reducing shader switches.
Viewing layers in your application that are rendered into texture
Switching between framebuffer objects can cause significant performance reduction on some platforms. Conditions when Kanzi renders a layer into a texture can be complex. For example, rotation, scale, or opacity can cause render to texture to occur.
To view if a layer is rendered into a texture, and causing a framebuffer object (FBO) switch, in the Preview enter the Debug mode and select Layer render to texture visualization.
The Preview highlights the layers that are rendered into texture with transparent, orange stripes.
See also
Partial rendering
Optimizing rendering of layouts
Setting layers for efficient rendering
Preventing overdraw with sorting filters
Rendering static content
Rendering transparent objects
Reducing shader switches
Measuring the performance of your Kanzi application
Best practices
Open topic with navigation